package org.example.entity;

public class Student1 {
    private int id;
    private String name;
    public Student1() {
        System.out.println("构造实现类对象2");
    }

    public Student1(int id, String name) {
        this.id = id;
        this.name = name;
    }
    public void a1() {
        System.out.println("创建");
    }
    public void a2() {
        System.out.println("销毁");
    }
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "Student{" +
                "id=" + id +
                ", name='" + name + '\'' +
                '}';
    }
}
